package com.ostrich.cloud.ostrichManagerWeb.client;

import com.ostrich.cloud.common.result.Result;
import com.ostrich.ostrichUserService.param.bussiness.RegBussinessmanParam;
import com.ostrich.ostrichUserService.param.bussiness.UpdateBusParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.omg.CORBA.INTERNAL;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
* name是项目名，contextId是client的名字
*/
@FeignClient(contextId = "businessManagerClient",name="ostrichManagerWeb")
@Api("管理商家相关接口")
public interface BusinessManagerClient {

    @PostMapping("addBusiness")
    @ApiOperation("添加商家接口")
    public Result addBusiness(@RequestBody @Valid RegBussinessmanParam param);

    @PutMapping("updateBusinessMessage")
    @ApiOperation("修改商家个人信息接口")
    public Result updateBusinessMessage(@RequestBody @Valid UpdateBusParam updateBusParam);


    @GetMapping("getAllBusiness")
    @ApiOperation("查询所有商家接口")
    public Result getAllBusiness(@RequestParam("current")Integer current,@RequestParam("size") Integer size,
                                    @RequestParam(value = "status" ,required = false)String status);

}
